import React from 'react';
import { observer ,inject} from 'mobx-react';
import TimelineStore from '../../stores/timeline/TimelineStore';
import Container from './Container';
import { Spin } from 'antd';
import './css/timeline.css';

export interface timelineProps {
    timelineStore:TimelineStore,
    location:string
}

@inject('timelineStore')
@observer
export default class DisplayBoard extends React.Component<timelineProps, any>{

    componentWillMount(){
        const {timelineStore,location}=this.props;
        timelineStore.param=location['query'];
    }

    render(){
        const {timelineStore}=this.props;
        return <div className="cube_timeline" style={{height:'100%'}}>
            <Spin spinning={timelineStore.loading}>
                <Container {...this.props}></Container>
            </Spin>
        </div>
    }
}